﻿#ifndef __CHECKPOINT_H_
#define __CHECKPOINT_H_
#include "Entity.h"
#include<qvector.h>
#include"GameLevelOne.h"
class Fighting;
class GameOver;
class GameStart;
class GameButton;
class GameLevelOne;
//关卡
class Checkpoint : public QObject,public Entity
{
    Q_OBJECT
public:
    Checkpoint(QSize size, QObject* parent = nullptr);
    ~Checkpoint();
    void init();
    virtual void update();
    void updateFighting();
    virtual void draw(QPainter* painter);
    //创建关卡按钮
    void NewButtom();
    //释放关卡按钮
    void DeleteButtom();
    //连接对应的函数
    void connectLevel(GameButton* temp,int n);
signals:
   void GameOverScore(const int score);
public slots:
    void LevelOne();
    void LevelTwo();
    void LevelThree();
    void LevelFour();
    void LevelFive();
    void LevelSix();
    void LevelSeven();
    void LevelEight();
private:
    QSize m_Size;//窗口地图大小
    Fighting* m_Fighting=nullptr;//战斗
    QVector<GameButton*> m_LevelButtom;
    GameButton* m_Quit = nullptr;//退出按钮
    GameButton* m_GetBack = nullptr;//返回按钮
};

#endif